<html>
<head>

</head>

<body>
<table>
				<tr>
					<td width="300">
						<label>Nomor Induk Siswa<span class="small">isi nomor induk siswa</span></label>
					</td>
					<td colspan="2">
						<input type="text" name="NIS" id="NIS" />
					</td>
				</tr>
				<tr>
					<td>
						<label>Tahun Masuk<span class="small">isi tahun masuk siswa</span></label>
					</td>
					<td colspan="2">
						<input type="text" name="tahun_masuk" id="tahun_masuk" />
					</td>
				</tr>
				<tr>
					<td>
						<label>Jurusan<span class="small">jurusan siswa</span></label>
					</td>
					<td colspan="2">
						<select name="id_jurusan">
							<?php
						        $nama_jurusan = mysql_query("SELECT * FROM jurusan");  
								// $result = mysql_fetch_array($nama_jurusan);
						        while($jurusan_data = mysql_fetch_array($nama_jurusan))
						        {
						   		?>  
        							<option value="<?= $jurusan_data[0]; ?>"><?= $jurusan_data['nama']?></option>  
								<?php  
								}  
								?>  	
					    </select>		
					</td>
				</tr>    
				<tr>
					<td>
						<label>Nama Lengkap<span class="small">Tambah nama siswa</span></label>
					</td>
					<td colspan="2">
						<input type="text" name="nama" id="nama" /></td>
				</tr>
				<tr>
					<td>
						<label> Tempat lahir<span class="small">Tempat lahir siswaa</span></label>
					</td>
					<td colspan="2">
						<input type = "text" name = "tempat_lahir" id = "tempat_lahir"/>
					</td>
			   </tr>
			   <tr> 
					<td>  
						<label> Tanggal Lahir<span class="small">Tanggal lahir siswa</span></label>
					</td>
					<td colspan="2">    
					   <select name='tanggal_lahir'>
						<?php 
							for ($i = 1; $i <= 31; $i++) {
								?>
								<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
							<?php
							}
						?>
						</select>
					
					  
					   <select name='bulan_lahir'>
						 <?php 
							for ($i = 1; $i < 13; $i++) {
								?>
								<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
							<?php
							}
						?>
						</select>
						<select name='tahun_lahir'>
						
						<?php 
						for ($i = 2000; $i >= 1985; $i--) {
							?>
							<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
							<?php
						}
						?>
						</select>
					</td>
				</tr>
				<tr>
					<td>
						<label>Agama<span class="small">isi agama siswa</span></label>
					</td>
					<td colspan="2">
						<input type="text" name="agama" id="agama" />
					</td>
				</tr>
				<tr>
					<td>
						<label>Jenis Kelamin<span class="small">isi jenis kelamin siswa</span></label>
					</td>
					<td width = "100">  
						<input type="radio" name="jenis_kelamin" value="laki-laki">Laki-laki
					</td>
					<td width = "100">
						<input type="radio" name="jenis_kelamin" value="perempuan">Perempuan
					</td>
				</tr>
				<tr>
					<td>
						<label>Alamat<span class="small">isi alamat siswa</span></label>
					</td>
					<td colspan="2">
						<input type="text" name="alamat" id="alamat" />
					<td>
				</tr>
				<tr>
					<td>
						<label>Kodepos<span class="small">isi kodepos siswa</span></label>
					</td>
					<td colspan="2">
						<select name="kode_pos">
							<?php 
						        $kode_pos = mysql_query("SELECT * FROM kode_pos");  
								// $result = mysql_fetch_array($nama_jurusan);
						        while($kode_pos_data = mysql_fetch_array($kode_pos))
						        {
						   		?>  
									
        							<option value="<?= $kode_pos_data[0]; ?>"><?= $kode_pos_data['0']?></option>  
								<?php  
								}  
								?>  	
					    </select>		
					</td>
				</tr>
				<tr>
					<td>
						<label>Kota<span class="small">isi kota siswa</span></label>
					</td>
					<td colspan="2">
						
        				<input type="text" name="kota" id="kota"/>	
						
					</td>
				</tr>
				<tr>
					<td>
						<label>Provinsi<span class="small">isi provinsi siswa</span></label>
					</td>
					<td colspan="2">
						<input type="text" name="provinsi" id="provinsi" />
					</td>
				</tr>
				<tr>
					<td>
						<label>No. Telepon/HP<span class="small">isi no telepon siswa</span></label>
					</td>
					<td colspan="2">
						<input type="text" name="no_tlp" id="no_tlp" />
					</td>
				</tr>
            </table>
               
            <h1>Data Akademik SMP</h1>
            <table>
				<tr>
					<td width="300">
						<label>Nama SMP Asal
						 <span class="small">isi asal SMP siswa</span>
						</label>
					</td>
					<td width="200">
						<input type = "text"  name = "smp_asal" id = "smp_asal"/>
					</td>
				</tr>
				<tr>
					<td>
						<label>No Ijazah
						 <span class="small">isi nomor ijazah siswa</span>
						</label>
					</td>
					<td>
						<input type = "text" name = "no_ijazah" id = "no_ijazah"/>
					</td>
				</tr>
            </table>
               
            <h1>Data Orang Tua/Wali</h1>
            <table>
				<tr>
					<td width="300">
						<label>Nama Ayah
						 <span class="small">isi nama ayah</span>
						</label>
					</td>
						
					<td width="200">
						<input type = "text" name = "nama_ayah" id = "nama_ayah"/>
					</td>
				</tr>
				<tr>
					<td>
						<label>Pekerjaan Ayah
						 <span class="small">isi pekerjaan ayah</span>
						</label>
					</td>
						
					<td>
						<input type = "text" name = "pekerjaan_ayah" id = "pekerjaan_ayah"/>
					</td>
				</tr>
				<tr>
					<td>
						<label>Nama ibu
							<span class = "small"> isi nama ibu </span>
						</label>
					</td>
					<td>
						<input type = "text" name = "nama_ibu" id = "nama_ibu"/>
					</td>
				</tr>
				<tr>
					<td>
						<label>Pekerjaan ibu
							<span class = "small"> isi nama ibu </span>
						</label>
					</td>
					<td>
						<input type = "text" name = "pekerjaan_ibu" id = "pekerjaan_ibu"/>
					</td>
				</tr>
				<tr>
					<td>
						<label>Nama wali
								<span class = "small"> isi nama wali </span>
						</label>
				   </td>
				   <td>
						<input type = "text" name = "nama_wali" id = "nama_wali"/>
				   </td>	
				</tr>
				<tr>
					<td>
						<label>Pekerjaan wali
								<span class = "small"> isi pekerjaan wali </span>
						</label>
				   </td>
				   <td>
						<input type = "text" name = "pekerjaan_wali" id = "pekerjaan_wali"/>
				   </td>	
				</tr>
				<tr>
					<td>
						<label>Alamat Wali
							<span class="small">isi alamat wali</span>
						</label>
					</td>
					<td>
						 <input type="text" name="alamat_wali" id="alamat_wali" />
					<td>
				</tr>
			
				<tr>
					<td>
						<label>Kodepos
							<span class="small">isi kodepos wali</span>
						</label>
					</td>
					<td>
						<select name="kode_pos1">
							<?php 
						        $kode_pos = mysql_query("SELECT * FROM kode_pos");  
								// $result = mysql_fetch_array($nama_jurusan);
						        while($kode_pos_data = mysql_fetch_array($kode_pos))
						        {
						   		?>  
        							<option value="<?= $kode_pos_data[0]; ?>"><?= $kode_pos_data['0']?></option>  
								<?php  
								}  
								?>  	
						</select>
					</td>
				</tr>
                
				<tr>
					<td>
						<label>Kota
							<span class="small">isi kota wali</span>
						</label>
					</td>
					<td>
						<input type="text" name="kota" id="kota" />
					</td>
				</tr>
                	
				<tr>
					<td>
						<label>Provinsi
							<span class="small">isi provinsi wali</span>
						</label>
					</td>
					<td>
						<input type="text" name="provinsi" id="provinsi" />
					</td>
              	</tr>
               
               	<tr>
                	<td>
                		<label>No. Telepon/HP
                    		<span class="small">isi no telepon wali</span>
                		</label>
                	</td>
                	<td>
                		<input type="text" name="no_tlp_wali" id="no_tlp_wali" />
                	</td>
				</tr>
               
				<tr>
                	<td>
                		<label>email
                    		<span class="small">isi email wali</span>
                		</label>
                	</td>
                	<td>
                		<input type="text" name="email_wali" id="email_wali" />
                	</td>
				</tr>
				<tr></tr>
				<tr></tr>
				<tr>
                  <td><input type="submit" name="submit" value="Tambah"/></td>
                </tr> 
			</table>
			
</body>			
</html>			